#include <iostream>
#include "cpp-httplib/httplib.h"

using namespace std;

const char* SERVER_IP="127.0.0.1";
const int SERVER_PORT=9090;

int main()
{
    httplib::Client client(SERVER_IP,SERVER_PORT);

    httplib::MultipartFormData file;
    
    file.name="test";//表单字段名称
    file.filename="test.txt";//文件名
    file.content="this is a test!";//文件内容
    file.content_type="text/plain";//内容类型

    client.Post("/upload",httplib::MultipartFormDataItems()={file});


    return 0;
}